package networkLoader;

public class VPort {
    private String name;
    private VDevice vdevice;
    private VPort peer = null;

    public VPort(String name) {
        this.name = name;
    }

    public VPort(String name, VDevice device) {
        this.name = name;
        this.vdevice = device;
    }

    public VDevice getPeerDevice() {
        if (this.peer == null) {
            return null;
        }
        return this.peer.vdevice;
    }

    public void setVDevice(VDevice vdevice) {
        this.vdevice = vdevice;
    }

    public VDevice getVDevice() {
        return vdevice;
    }

    public void setPeer(VPort peer) {
        this.peer = peer;
    }

    public VPort getPeer() {
        return peer;
    }

    public String getName() {
        return name;
    }
}
